/**
 * Created by karim on 2017/1/23.
 */

/*通过ID获取该路由器详细信息*/
function getRouterDetatils(sign) {
	$.ajax({
        url:"tag/findDeviceBox.html",
        type:"post",
        data:{
            id:sign,callback:'content :: routerDetails',
        },
        success:function(result){
        	$("#content").html(result);
        },
        error:function(err){
            console.log(err);
        }
    });
}
function back(){
	if($("#back").attr("name")==1){
		window.history.go(-1);
	}else{
		window.location.href='router.html'
	};
};

$(function(){
//	$('#rightMain_title').html('路由器详情');	
	$('#lableViews',window.parent.document).find("#rightMain_title").html("路由器详情");
    $("title").text("路由器详情页"); 
	/*获取路由器ID*/
    var sign = getUrlParam("sign");
    getRouterDetatils(sign);
    $("#editSave").click(function(){
    	var roterSn = $(".routerSn").text();
    	window.location.href='setting.html?sign='+roterSn+"_"+sign;
    });
	
	$("#simRow").click(function(){
		window.location.href = 'card.html?sign='+location;
	})

})